<?php use_helper('I18N', 'Date') ?>
<?php include_partial('new/assets') ?>


<div id="sf_admin_container">
  <h1><?php echo __('Editar "%%title%%"', array('%%title%%' => $blog_new->getTitle()), 'messages') ?></h1>

  <?php include_partial('new/flashes') ?>
<div id="tabs">      
    <ul>
        <li><a href="#tabs-1" id="tab">Cargar Noticia</a></li>
	<li><a href="#tabs-2" id="img">Cargar Imágenes</a></li>				
    </ul>
      
    <div id="tabs-1">
        <div id="sf_admin_header">
          <?php include_partial('new/form_header', array('blog_new' => $blog_new, 'form' => $form, 'configuration' => $configuration)) ?>
        </div>

        <div id="sf_admin_content">
          <?php include_partial('new/form', array('blog_new' => $blog_new, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
        </div>

        <div id="sf_admin_footer">
          <?php include_partial('new/form_footer', array('blog_new' => $blog_new, 'form' => $form, 'configuration' => $configuration)) ?>
        </div>
    </div>
    
    <div id="tabs-2">
        <?php include_partial('medium/form', array('blog_medium' => $blog_medium, 'form' => $form_medium, 'configuration' => $configuration, 'helper' => $helper)) ?>
        <?php //echo $form_medium ?>
        <input style="margin-left: 150px" type="button" value="Ver imágenes" onclick="mostrarDialog()">
        
        
        <div id="dialog" style="display:none" title="Imagenes" style="height:100%">
        </div>	        
    </div>
</div>
</div>
<script>
    $(function() {
        $( "#tabs" ).tabs();		
    });
</script>
<script type="text/javascript">    
tinyMCE.init({
    mode : 'exact',
    theme : 'advanced',
    plugins : "print,contextmenu,paste,inlinepopups",

    paste_auto_cleanup_on_paste : true,
    paste_remove_spans: true,
    paste_remove_styles: true,	
    paste_remove_divs: true,
    
    elements: 'blog_new_content, blog_new_summary',   
    
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor,emotions,media,|,print,|,fullscreen",
    theme_advanced_buttons3 : "",
    
    
    theme_advanced_toolbar_location : 'top',
    theme_advanced_toolbar_align : 'left',        
    invalid_elements: "div"
	
});


$(document).ready(function() {
$("input[type='submit']").click(function() {
tinyMCE.triggerSave();
})
})
</script>
<script>
	function mostrarDialog() {
		$("#dialog").dialog({ height: 700, width: 950 });
		$("#dialog").load("/plugins/uploadify/mostrar_imagenes.php?id=<?php echo $blog_new->getId(); ?>");
	};
</script>

